//
//  def_expression_statement.h
//  compilation
//
//  Created by Kevin Le perf on 17/01/12.
//  Copyright (c) 2012 e2co technologie. All rights reserved.
//

#ifndef compilation_def_expression_statement_h
#define compilation_def_expression_statement_h

/*
 expression_statement
 : ';' {printf("expression_statement\n");}
 | expression ';' {printf("expression_statement\n");}
 ; 
 */

struct def_expression_statement{
	void * parent;
	int type;
	struct def_expression * expression;
};

struct def_expression_statement * expression_statement_create(void * parent){
	struct def_expression_statement * s = malloc(sizeof(*s));
	s->type = 0;
	s->parent = parent;
	return s;
}

void expression_statement_print(struct def_expression_statement * s){
	switch(s->type){
		case 1:
			printf(";");
			break;
		case 2:
			expression_print(s->expression);
			printf(";");
	}
}
#endif
